﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

namespace theseaturtlestore
{
    public partial class In_Memory : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {

            SqlConnection myconnection = new SqlConnection("server=65.36.214.248;database=Turtle.mdf;User id= theseaturtle;Password=Fn3ff9c8");
            //"Data Source=geyser.safesecureweb.com\\theseaturtle;AttachDbFilename=|DataDirectory|\\Turtle.mdf; User id= theseaturtle; Password=Fn3ff9c8 Instance=True
            //SqlConnection myconnection = new SqlConnection("Data Source=65.36.214.248\\theseaturtle;AttachDbFilename=|DataDirectory|\\Turtle.mdf; User id= theseaturtle; Password=Fn3ff9c8 Instance=True");
            myconnection.Open();
            SqlCommand mycommand = new SqlCommand("insert into dbo.Memory values('"+dfsLoving.Text+"','"+dfsName.Text+"','"+dfsComments.Text+"')", myconnection);

            mycommand.ExecuteNonQuery();
            SqlCommand com = new SqlCommand("select [Comments], [Loving] from dbo.memory", myconnection);
            com.ExecuteReader();
            myconnection.Close();

           // bp.BusinessLogic.Mail mail = new bp.BusinessLogic.Mail();
           // //Confirmation page that will be sent to the user
           // string msg = mail.SendMail(Server.MapPath("ContactConfirmation.html"), "mail.bpwe.net", "savetheseaturtle@yahoo.com", dfsEmail.Text,
           //                           "root@bpwe.net", "Nv4c7df7", "Thank You For Supporting NATIONAL SAVE THE SEA TURTLE FOUNDATION", dfsName.Text, "",
           //                           "", Guid.NewGuid(), "", "", "");



           // //notification page
           // mail.SendMail(Server.MapPath("ContactNotification.html"), "mail.bpwe.net", dfsEmail.Text, "savetheseaturtle@yahoo.com",
           // "root@bpwe.net", "Nv4c7df7", "In Memory Notification", "NATIONAL SAVE THE SEA TURTLE FOUNDATION", "",


           //dfsName.Text + "<br/>" + "<br/>" + "Email Address : " + dfsEmail.Text + "In Loving Memory of :" + dfsLoving.Text + "Comments :" + dfsComments.Text, Guid.NewGuid(), "", "", "");


            Response.Redirect("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8089430");
        }
    }
}